#ifndef DISPLAYMANAGER
#define DISPLAYMANAGER

#include <allegro.h>
#include "ObjectManager.hpp"

class DisplayManager {
    public:
        DisplayManager();
        ~DisplayManager();
        bool init(ObjectManager* obj_mgr, unsigned w, unsigned h, int x, int y); // ObjectManager*, window size & pos
        void drawObjects();
        bool isRunning();
    private:
        BITMAP *alt_buf; // use double buffering to avoid screen flicker
        BITMAP *paths; // does not get cleared unless zoomed
        ObjectManager* obj_mgr; // so that it can request list of objects, find elapsed time and change precision
        double displayScale;
        bool running;
        void checkKeys(); // controls
        void zoomIn();
        void zoomOut();
};

#endif
